/*
 * 本类作用：mina框架:装载信息的实体类
 * 
 * 作者：袁小杰
 * 博客：http://blog.csdn.net/undoner
 * GIT：https://git.oschina.net/undoner
 * QQ：15137281
 * 
 */
package org.mina.server.codec;

import org.apache.log4j.Logger;
import org.mina.util.Tools;

/**
 * 装载信息的实体类
 * */
public class MsgEntity {

	private String content;

	static Logger log = Logger.getRootLogger();
	
	public MsgEntity() {
		log.debug("MsgEntity()");
	}

	public MsgEntity(String content) {
		log.debug(this.getClass().getName() + "MsgEntity(String):"+content);
		this.content = content;
	}
	
	public MsgEntity(byte[] bs) {
		log.debug(this.getClass().getName() + "MsgEntity(byte[])");
		if (bs != null && bs.length > 0) {
			// 将正文转换到content中
			content = new String(bs);
		}
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String toString() {
		return content;
	}
}
